using AutoMapper.EquivalencyExpression;


namespace Volo.Abp.AutoMapper
{
    public static class AbpAutoMapperOptionsExtension
    {
        private static Action<IAbpAutoMapperConfigurationContext> configureCollectionMapperContext = context => context.MapperConfiguration.AddCollectionMappers();

        /// <summary>
        /// 添加集合映射
        /// </summary>
        /// <param name="opts"></param>
        public static void AddCollectionMappers(this AbpAutoMapperOptions opts)
        {
            opts.Configurators.AddIfNotContains(configureCollectionMapperContext);
        }
    }
}
